#pragma once
#include "Map.h"

class WorldMap : public Map{
public:
	WorldMap(Character* aHero, int aSeed);
	virtual ~WorldMap();

	Node GetHeroSpawn(int aFacing = -1);
	void SaveHeroSpawn(Node aSpawn);

	Node GetActualCityCoords() {return cityCoords;};
	void SaveActualCityCoords(Node aCity) {cityCoords = aCity;};

	vector<Node> cities;
	vector<string> citiesNames;

private:
	// main data
	EGenerator _generator;
	Node lastSpawn;
	Node cityCoords;

	// generators
	void GenerateMapData();

	void generateAlexander();
	void generatePerlin();

	void generateBiomes();
		void findOceans(int aX, int aY);
		void generateTerrain();
			void generateRivers();
				void generateBridges();
			void generateTreesAndMoutains();
			void generateCities();
				Node findSettlement();
				void placeRoads(vector<Node> aRoads);
};